import os
from dotenv import load_dotenv

# 加载环境变量
load_dotenv()

# Ollama配置
OLLAMA_BASE_URL = os.getenv("OLLAMA_BASE_URL", "http://localhost:11434")
OLLAMA_MODEL = os.getenv("OLLAMA_MODEL", "qwq:32b-fp16")
OLLAMA_TEMPERATURE = float(os.getenv("OLLAMA_TEMPERATURE", "0.1"))
OLLAMA_CONTEXT_WINDOW = int(os.getenv("OLLAMA_CONTEXT_WINDOW", "8192"))

# 代码分析配置
MAX_DEPTH = int(os.getenv("MAX_DEPTH", "3"))  # 调用关系追踪深度
CODE_EXTENSIONS = [".py", ".java", ".js", ".ts", ".c", ".cpp", ".go", ".rs"]

# 知识图谱配置
USE_GRAPH_DB = os.getenv("USE_GRAPH_DB", "False").lower() == "true"
GRAPH_DB_URL = os.getenv("GRAPH_DB_URL", "bolt://localhost:7687")
GRAPH_DB_USER = os.getenv("GRAPH_DB_USER", "neo4j")
GRAPH_DB_PASSWORD = os.getenv("GRAPH_DB_PASSWORD", "password")

# 文件存储配置
OUTPUT_DIR = os.getenv("OUTPUT_DIR", "generated_docs")

# 启用调试模式
DEBUG = os.getenv("DEBUG", "False").lower() == "true"
